package com.todo.event.activity.infrastructure.mapper;

import com.todo.event.activity.infrastructure.entity.condition.EventInfoCondition;
import com.todo.event.activity.infrastructure.entity.po.EventInfoPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author azhebuxing
 * @date 2025/1/6 19:33
 * @description
 */
@Mapper
public interface EventInfoMapper {

    EventInfoPO queryEventInfoPOById(@Param("id") Long id);

    int insertEventInfoPO(EventInfoPO eventInfo);

    int updateEventInfoPOById(EventInfoPO eventInfo);

    int removeEventInfoPOById(@Param("id") Long id);

    List<EventInfoPO> queryEventInfoListByCondition(EventInfoCondition eventInfoCondition);

    Long queryCountByCondition(EventInfoCondition eventInfoCondition);

    int updateEventInfoStatus(@Param("id") Long id, @Param("oldStatus") Integer oldStatus, @Param("newStatus") Integer newStatus);

    EventInfoPO queryEventInfoByCode(@Param("eventCode") String eventCode);

    EventInfoPO queryEventInfoPOByName(@Param("eventName") String eventName);

    List<EventInfoPO> queryEventInfoByTopic(@Param("topicName") String topicName, @Param("tag") String tag, @Param("status") Integer status);
}
